home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2002 #11
/
Amiga Plus CD - 2002 - No. 11.iso
/
Tools
/
Development
/
PowerD
/
powerd
/
source
/
lib
/
powerd_lib.lha
/
PowerD
/
BitCount.ass
< prev
next >
Wrap
Text File
|
2001-01-11
|
196b
|
15 lines
; d0 - value
xdef _BitCount
_BitCount move.l d2,a0
moveq #0,d1
moveq #31,d2 ; number of bit
.loop btst.l d2,d0
beq.s .skip
addq #1,d1
.skip dbra.s d2,.loop
move.l d1,d0
move.l a0,d2
rts